﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace GameDataTempshitEditor.Widgets
{
    public partial class DataPropertyPanel : UserControl
    {
        public DataPropertyPanel()
        {
            InitializeComponent();
        }

        public PropertyItemBase Root
        {
            get
            {
                return dataPropertyGrid1.Root;
            }
            set
            {
                dataPropertyGrid1.Root = value;
            }
        }

        public ImageList ImageList
        {
            get
            {
                return dataPropertyGrid1.ImageList;
            }
            set
            {
                dataPropertyGrid1.ImageList = value;
            }
        }

        public void RefreshValues()
        {
            dataPropertyGrid1.RefreshValues();
        }

        private void toolToggleAdvancedProperties_Click(object sender, EventArgs e)
        {
            dataPropertyGrid1.ShowAdvancedProperties = !dataPropertyGrid1.ShowAdvancedProperties;
            toolToggleAdvancedProperties.Checked = dataPropertyGrid1.ShowAdvancedProperties;
        }
    }
}
